Namespaces

Functions

string|array|null
__(string|null $key = null, array $replace = [], string|null $locale = null)

Translate the given message.

never
abort(Response|Responsable|int $code, string $message = '', array $headers = [])

Throw an HttpException with the given data.

void
abort_if(bool $boolean, Response|Responsable|int $code, string $message = '', array $headers = [])

Throw an HttpException with the given data if the given condition is true.

void
abort_unless(bool $boolean, Response|Responsable|int $code, string $message = '', array $headers = [])

Throw an HttpException with the given data unless the given condition is true.

string
action(string|array $name, mixed $parameters = [], bool $absolute = true)

Generate the URL to a controller action.

app(string|TClass>|null $abstract = null, array $parameters = [])

Get the available container instance.

string
app_path(string $path = '')

Get the path to the application folder.

array
append_config(array $array)

Assign high numeric IDs to a config item to force appending.

string
asset(string $path, bool|null $secure = null)

Generate an asset path for the application.

auth(string|null $guard = null)

Get the available auth instance.

back(int $status = 302, array $headers = [], mixed $fallback = false)

Create a new redirect response to the previous location.

string
base_path(string $path = '')

Get the path to the base of the install.

string
bcrypt(string $value, array $options = [])

Hash the given value against the bcrypt algorithm.

bool
blank(mixed $value)

Determine if the given value is "blank".

broadcast(mixed|null $event = null)

Begin broadcasting an event.

cache(string|array<string,mixed>|null $key = null, mixed $default = null)

Get / set the specified cache value.

string
class_basename(string|object $class)

Get the class "basename" of the given object / class.

array
class_uses_recursive(object|string $class)

Returns all traits used by a class, its parent classes and trait of their traits.

TValue>
collect(TValue>|TValue>|null $value = [])

Create a collection from the given value.

config(array<string,mixed>|string|null $key = null, mixed $default = null)

Get / set the specified configuration value.

string
config_path(string $path = '')

Get the configuration path.

context(array|string|null $key = null, mixed $default = null)

Get / set the specified context value.

csrf_field()

Generate a CSRF token form field.

string
csrf_token()

Get the CSRF token value.

mixed
data_fill(mixed $target, string|array $key, mixed $value)

Fill in data where it's missing.

mixed
data_forget(mixed $target, string|array|int|null $key)

Remove / unset an item from an array or object using "dot" notation.

mixed
data_get(mixed $target, string|array|int|null $key, mixed $default = null)

Get an item from an array or object using "dot" notation.

mixed
data_set(mixed $target, string|array $key, mixed $value, bool $overwrite = true)

Set an item on an array or object using dot notation.

string
database_path(string $path = '')

Get the database path.

mixed
decrypt(string $value, bool $unserialize = true)

Decrypt the given value.

defer(callable|null $callback = null, string|null $name = null, bool $always = false)

Defer execution of the given callback.

dispatch(mixed $job)

Dispatch a job to its appropriate handler.

mixed
dispatch_now(mixed $job, mixed $handler = null)
deprecated

Dispatch a command to its appropriate handler in the current process.

mixed
dispatch_sync(mixed $job, mixed $handler = null)

Dispatch a command to its appropriate handler in the current process.

string
e(DeferringDisplayableValue|Htmlable|BackedEnum|string|int|float|null $value, bool $doubleEncode = true)

Encode HTML special characters in a string.

string
elixir(string $file, string $buildDirectory = 'build')
deprecated

Get the path to a versioned Elixir file.

string
encrypt(mixed $value, bool $serialize = true)

Encrypt the given value.

mixed
env(string $key, mixed $default = null)

Gets the value of an environment variable.

array|null
event(...$args)

Dispatch an event and call the listeners.

FactoryBuilder
factory(string $class, int $amount = null)

Create a model factory builder for a given class and amount.

Generator
fake(string|null $locale = null)

Get a faker instance.

bool
filled(mixed $value)

Determine if a value is "filled".

fluent(object|array $value)

Create a Fluent object from the given value.

mixed
head(array $array)

Get the first element of an array. Useful for method chaining.

void
info(string $message, array $context = [])

Write some information to the log.

string
lang_path(string $path = '')

Get the path to the language folder.

bool
laravel_cloud()

Determine if the application is running on Laravel Cloud.

mixed
last(array $array)

Get the last element from an array.

literal(...$arguments)

Return a new literal or anonymous object using named arguments.

logger(string|null $message = null, array $context = [])

Log a debug message to the logs.

logs(string|null $driver = null)

Get a log driver instance.

method_field(string $method)

Generate a form field to spoof the HTTP verb used by forms.

HtmlString|string
mix(string $path, string $manifestDirectory = '')

Get the path to a versioned Mix file.

now(DateTimeZone|string|null $tz = null)

Create a new Carbon instance for the current time.

object_get(TValue $object, string|null $key, mixed $default = null)

Get an item from an object using "dot" notation.

mixed
old(string|null $key = null, mixed $default = null)

Retrieve an old input item.

once(callable $callback)

No description

optional(TValue $value = null, callable|null $callback = null)

Provide access to optional objects.

mixed
policy(object|string $class)

Get a policy instance for a given class.

mixed
precognitive(null|callable $callable = null)

Handle a Precognition controller hook.

string
preg_replace_array(string $pattern, array $replacements, string $subject)

Replace a given pattern with each value in the array in sequentially.

string
public_path(string $path = '')

Get the path to the public folder.

redirect(string|null $to = null, int $status = 302, array $headers = [], bool|null $secure = null)

Get an instance of the redirector.

void
report(Throwable|string $exception)

Report an exception.

void
report_if(bool $boolean, Throwable|string $exception)

Report an exception if the given condition is true.

void
report_unless(bool $boolean, Throwable|string $exception)

Report an exception unless the given condition is true.

request(list<string>|string|null $key = null, mixed $default = null)

Get an instance of the current request or an input item from the request.

rescue(callable $callback, $rescue = null, $report = true)

No description

resolve(string|TClass> $name, array $parameters = [])

Resolve a service from the container.

string
resource_path(string $path = '')

Get the path to the resources folder.

response(View|string|array|null $content = null, int $status = 200, array $headers = [])

Return a new response from the application.

TValue
retry(int|array<int,int> $times, callable $callback, $sleepMilliseconds = 0, $when = null)

Retry an operation a given number of times.

string
route(BackedEnum|string $name, mixed $parameters = [], bool $absolute = true)

Generate the URL to a named route.

string
secure_asset(string $path)

Generate an asset path for the application.

string
secure_url(string $path, mixed $parameters = [])

Generate a HTTPS url for the application.

session(array<string,mixed>|string|null $key = null, mixed $default = null)

Get / set the specified session value.

string
storage_path(string $path = '')

Get the path to the storage folder.

str(string|null $string = null)

Get a new stringable object from the given string.

tap(TValue $value, $callback = null)

Call the given Closure with the given value then return the value.

throw_if(TValue $condition, TException|TException>|string $exception = 'RuntimeException', mixed ...$parameters)

Throw the given exception if the given condition is true.

throw_unless(TValue $condition, TException|TException>|string $exception = 'RuntimeException', mixed ...$parameters)

Throw the given exception unless the given condition is true.

to_route(BackedEnum|string $route, mixed $parameters = [], int $status = 302, array $headers = [])

Create a new redirect response to a named route.

today(DateTimeZone|string|null $tz = null)

Create a new Carbon instance for the current date.

array
trait_uses_recursive(object|string $trait)

Returns all traits used by a trait and its traits.

trans(string|null $key = null, array $replace = [], string|null $locale = null)

Translate the given message.

string
trans_choice(string $key, Countable|int|float|array $number, array $replace = [], string|null $locale = null)

Translates the given message based on a count.

transform(TValue $value, callable $callback, $default = null)

Transform the given value if it is present.

url(string|null $path = null, mixed $parameters = [], bool|null $secure = null)

Generate a url for the application.

validator(array|null $data = null, array $rules = [], array $messages = [], array $attributes = [])

Create a new Validator instance.

TValue
value($value, TArgs ...$args)

Return the default value of the given value.

view(string|null $view = null, Arrayable|array $data = [], array $mergeData = [])

Get the evaluated view contents for the given view.

mixed
when(mixed $condition, Closure|mixed $value, Closure|mixed $default = null)

Return a value if the given condition is true.

bool
windows_os()

Determine whether the current environment is Windows based.

with(TValue $value, callable|null $callback = null)

Return the given value, optionally passed through the given callback.